package com.luoying.itew.receiver;

import android.content.Context;

import com.luoying.itew.activity.MainActivity;
import com.luoying.itew.event.JPushEvent;

import org.greenrobot.eventbus.EventBus;

import cn.jpush.android.api.JPushMessage;
import cn.jpush.android.service.JPushMessageReceiver;

/**
 * Created by Administrator on 2019/1/22.
 * time 2018-5-10
 * author zm
 */
public class MyJPushMessageReceiver extends JPushMessageReceiver {

    private static final String TAG = "MyJPushMessageReceiver";

    @Override
    public void onTagOperatorResult(Context context, JPushMessage jPushMessage) {
        super.onTagOperatorResult(context, jPushMessage);
    }
    @Override
    public void onCheckTagOperatorResult(Context context,JPushMessage jPushMessage){
        super.onCheckTagOperatorResult(context, jPushMessage);
    }
    @Override
    public void onAliasOperatorResult(Context context, JPushMessage jPushMessage) {
        super.onAliasOperatorResult(context, jPushMessage);
        if(jPushMessage!=null&&jPushMessage.getSequence()== MainActivity.BINDING_SEQUENCE){
            EventBus.getDefault().post(new JPushEvent(jPushMessage.getErrorCode()));
        }
    }

    @Override
    public void onMobileNumberOperatorResult(Context context, JPushMessage jPushMessage) {
        super.onMobileNumberOperatorResult(context, jPushMessage);
    }
}
